package xin.nick.cloud.email.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author Nick
 * @date 2021/8/1
 * @description 邮箱调用
 */
@FeignClient(name="my-service-email")
public interface ServiceEmailClient {

    /**
     * 远程调用邮箱服务进行发送验证码
     * @param email
     * @param code
     * @return
     */
    @RequestMapping(value = "/email/{email}/{code}", method = RequestMethod.GET)
    boolean sendEmail(@PathVariable("email") String email,
                 @PathVariable("code") String code);

}
